cmake_minimum_required(VERSION 3.0.2)
project(pcl2img)


find_package(catkin REQUIRED COMPONENTS
  cv_bridge
  image_transport
  roscpp
  rospy
  sensor_msgs
  geometry_msgs
  tf
  token_msgs
  std_msgs
)


find_package(OpenCV REQUIRED)
find_package(PCL REQUIRED)
find_package(Eigen3 REQUIRED)

###################################
## catkin specific configuration ##
###################################
catkin_package(
INCLUDE_DIRS include
LIBRARIES pcl2img
CATKIN_DEPENDS cv_bridge image_transport roscpp rospy sensor_msgs
DEPENDS system_lib
)

###########
## Build ##
###########
include_directories(
include
  ${catkin_INCLUDE_DIRS}
  ${OpenCV_INCLUDE_DIRS}
  ${PCL_INCLUDE_DIRS}
)


# add_library(pcl2img src/data_fusion_node.cpp)
# add_library(pcl2img src/data_fusion_node.cpp)

# add_dependencies(pcl2img ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS})


add_executable(pcl2img_node src/data_fusion.cpp src/data_fusion_node.cpp)
add_executable(img_fuse_node src/img_fuse.cpp src/img_fuse_node.cpp)

target_link_libraries(pcl2img_node
  ${catkin_LIBRARIES}
  ${OpenCV_LIBRARIES}
  ${PCL_LIBRARIES}
)
target_link_libraries(img_fuse_node
  ${catkin_LIBRARIES}
  ${OpenCV_LIBRARIES}
  ${PCL_LIBRARIES}
)
